#include <iostream>

using namespace std;

class Base
{
public:
    Base();
    //virtual void test() const = 0;
    virtual void test() const
    {
        cout << "Base" << endl;
    }
};
Base::Base()
{
    test();
}

class Derived : public Base
{
public:
    Derived()
    {}
    virtual void test() const
    {
        cout << "Derived" << endl;
    }
};

int main(int argc, char *argv[])
{
    Derived d;
    Base& p = d;
    p.test();
    return 0;
}
